var gid;
document.addEventListener('plusready',function(){
	plus.nativeUI.closeWaiting();
	gid = plus.storage.getItem('gid');
	var status = plus.storage.getItem('status');
	showWating();
	//最新资讯
	$.ajax({
		type : "get",
		url : apiRoot+"?m=home&c=article&a=newNews",
		dataType :'json',
		success : function(data){
			plus.nativeUI.closeWaiting();
			if(data.length > 0){
				var list = '';
				$.each(data, function(k,v) {
					list += '<div class="mui-table-view background table-view-cell home-list" data-id="'+v.id+'">'+
								'<div>'+
									'<img src="'+webRoot+v.litpic+'" alt="" />'+
								'</div>'+
								'<div class="">'+
									'<li class="font-17">'+(v.title).substring(0,10)+'...</li>'+
									'<li class="mui-ellipsis-2 font-12">'+(v.description)+'</li>'+
								'</div>'+
							'</div>';
				});
				$('.newsList').html(list);
				$('.home-list').on('click',function(){
					var id = $(this).attr('data-id');
					goNewPage('jk-new.html',{aid:id});
				})
			}
		},
		error :function(e){
			console.log(JSON.stringify(e));
		}
	})
	if(gid == '3'){
		$('.color-000').hide();
	}
	//发布资讯
	$('.color-000').on('tap', function(){
		if(status == '2'){
			goNewPage('jk-new-publish.html');
		}else{
			toast('您的身份暂未认证通过，不能进行此操作');
		}
	})
},false)